<link rel="stylesheet" type="text/css" href="../css/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../css/themes/icon.css">

<div id="panel-anti-dose-pop" data-options="border:false;width:100%">
	<div class="easyui-panel list-panel" data-options="openAnimation:'slide',closeAnimation:'slide'">
	  	<div class="well well-small" style="margin-left: 5px;margin-top: 5px">
			<p>
				<span class="badge">提示</span>
				 <strong><font color="red">双击</font></strong> 记录行, 可以查看基本药物比例详情
			</p>			
		</div>   
	
		<table class="easyui-datagrid dg-list" 
			data-options="rownumbers:true,
			animate: true,						
			striped:true,
			border:true,
			//singleSelect:false,
			idField: 'id',						
			fitColumns: true,
			checkOnSelect:true,
			selectOnCheck:true,
			pagination : true">
			
			<thead>						
				<tr>								
					<th field="dept_name" width="60" halign="center" align="left">科室名称</th>
				
					<th field="count_num" width="60" align="center">出院病人总数</th>
					<th field="day_num" width="60" align="center">总床日数</th>
					<th field="day_avg" width="60" align="center" data-options="
						formatter: function(value,row,index){
							if (value && value > 0){
								return   value.toFixed(2);							
							}else{
								return null;
							}
						}
					">平均床日数</th>
					<th field="anti_ddd" width="60" align="center" data-options="
						styler: function(value,row,index){
							var standard
							if(row &&　row.amount_percent_standard){
								standard = row.amount_percent_standard
							}else{
								standard = null
							}
							if (value){
								if(value > standard){
									return 'color:red;';							
								}else{
									return 'color:green;';
								}
							}else{
								return 'color:green;';
							}
						},
						formatter: function(value,row,index){
							if (value && value > 0){
								return   value.toFixed(2);							
							}else{
								return null;
							}
						}
						
					">抗菌药物使用强度</th>				
					<th field="amount_percent_standard" width="60" align="center">抗菌药物使用强度指标</th>															
											
				</tr>
			</thead>
			
		</table>
	</div>
	
	<div class="easyui-panel details-panel" data-options="closed:true,openAnimation:'slide',closeAnimation:'slide'">
	  	   
		<div>						
			<a href="javascript:void(0);" class="easyui-linkbutton function-btn l-btn l-btn-small l-btn-plain" iconcls="icon-undo" plain="true">返回</a>
		</div>
		<table class="easyui-datagrid dg-list" 
			data-options="rownumbers:true,
			animate: true,						
			striped:true,
			border:true,
			//singleSelect:false,
			idField: 'id',						
			fitColumns: true,
			checkOnSelect:true,
			selectOnCheck:true,
			pagination : true">
			
			<thead>						
				<tr>								
					<th field="dept_name" width="60" halign="center" align="left">科室名称</th>
					<th field="doct_name" width="40" halign="center" align="left">医生名称</th>
					<th field="count_num" width="60" align="center">出院病人总数</th>
					<th field="day_num" width="60" align="center">总床日数</th>
					<th field="day_avg" width="60" align="center" data-options="
						formatter: function(value,row,index){
							if (value && value > 0){
								return   value.toFixed(2);							
							}else{
								return null;
							}
						}
					">平均床日数</th>
					<th field="anti_ddd" width="60" align="center" data-options="
						styler: function(value,row,index){
							var standard
							if(row &&　row.amount_percent_standard){
								standard = row.amount_percent_standard
							}else{
								standard = null
							}
							if (value){
								if(value > standard){
									return 'color:red;';							
								}else{
									return 'color:green;';
								}
							}else{
								return 'color:green;';
							}
						},
						formatter: function(value,row,index){
							if (value && value > 0){
								return   value.toFixed(2);							
							}else{
								return null;
							}
						}
						
					">抗菌药物使用强度</th>				
					<th field="amount_percent_standard" width="60" align="center">抗菌药物使用强度指标</th>															
									
				</tr>
			</thead>
			
		</table>
	</div>
	
</div> 

 
<script>
requirejs(['popListPage','antiDose','domReady!'],function(flowedit,antiDose,doc){
	flowedit.init({doc:doc,
		rootId:'panel-anti-dose-pop',
		subSystemCode:'medical',
		moduleCode:'antiDoseInfo',
		queryModule:'antiDose',
		querylistUrl:'getListDomain',
		editWindow:'anti-dose-pop-win',
		initElement:antiDose.initMain,				
		rowClick:antiDose.clickBizRow
	});
});	
</script>

